$OpenBSD: patch-buildtools_wafsamba_samba_conftests_py,v 1.3 2016/04/22 11:48:36 jca Exp $
Reverse order of paths added to get reliable builds.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9890
--- buildtools/wafsamba/samba_conftests.py.orig	Wed Apr 13 17:18:35 2016
+++ buildtools/wafsamba/samba_conftests.py	Wed Apr 13 17:18:35 2016
@@ -39,9 +39,9 @@ def check(self, *k, **kw):
     def add_options_dir(dirs, env):
         for x in dirs:
              if not x in env.CPPPATH:
-                 env.CPPPATH = [os.path.join(x, 'include')] + env.CPPPATH
+                 env.CPPPATH = env.CPPPATH + [os.path.join(x, 'include')]
              if not x in env.LIBPATH:
-                 env.LIBPATH = [os.path.join(x, 'lib')] + env.LIBPATH
+                 env.LIBPATH = env.LIBPATH + [os.path.join(x, 'lib')]
 
     add_options_dir(additional_dirs, kw['env'])
 
